<template>
	<view class="agorecord"> 
		<section class="cart" v-for='(item,index) in dataList' @click='goDetail(item)' :key='index'>
			<delayItem :sendData='item'  ></delayItem>
		</section>
		
	</view>
</template>

<script>
	import delayItem from './components/delayItem.vue';
	export default {
		components: {
			delayItem
		},
		data() {
			return {
				dataList:[],
			}
		},
		methods: {
			goDetail(item){
				uni.navigateTo({
					url: '/pages/workOrder/applyDelay?id='+item.id
				});
			}
		},
		onLoad(option) {
			console.log('????',option)
			this.$store
				.dispatch('getApplyRecord',{pageIndex:0,pageSize:100})
				.then(res => {
					if (res.data.errorCode === 0) {
						 console.log(res.data.data)
						 this.dataList = res.data.data.content
						  
					}
				})
		}
	}
</script>

<style lang="scss" scoped>
	.agorecord{
		padding:15rpx ;
			.cart{
				background: #FFFFFF;
				border: 1px solid #C0C0C0;
				border-radius: 10upx;
				box-shadow: 0px 2px 11px 0px rgba(192,192,192,0.5);
				padding:30upx 20upx;
				margin: 20rpx;
			} 
	}
	
</style>
